<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>张家口集训会议</title>
    <script src="../static/js/jquery-3.6.0.min.js"></script>
    <script src="../static/js/socket.io.min.js"></script>
    <link rel="stylesheet" href="../static/css/pageB.css">
</head>

<body class="bg">
<div id="class_name" class="header">
</div>
<div class="tab1">
    <div id="status" class="note">
        {% if class_msg %}
            {{ class_msg[5] | safe }}
        {% else %}
            无
        {% endif %}
    </div>
    <div id="infotab" class="infotab">
        <div id="leader_name" class="duty">
            {% if class_msg %}
                {{ class_msg[4] }}
            {% else %}
                无
            {% endif %}
        </div>
        <div id="weather" class="weather">
            {% if class_msg %}
                {{ now_time}}{{ class_msg[6] | safe }}
            {% else %}
                无
            {% endif %}
        </div>
    </div>
</div>
<div id="content" class="tab2">
    {% for context in contexts %}
        <div class="li">
            {{ context[0] }}
        </div>
    {% endfor %}

</div>
<!-- <div>
    <button onclick="changepic()">切换图片1</button>
    <button onclick="changepic1()">切换图片2</button>
</div> -->

{#<script>#}
{#    $(document).ready(function () {#}
{#        namespace = '/pageB';#}
{#        var socket = io.connect(location.protocol + '//' + document.domain + ':' + location.port + namespace);#}
{#        socket.on('pageB', function (res) {#}
{#            var name = res.name;#}
{#            if (name) {#}
{#                $("#name").html(name);#}
{#            }#}
{#            var job = res.job;#}
{#            if (job) {#}
{#                $("#job").html(job);#}
{#            }#}
{#            var unit = res.unit;#}
{#            if (unit) {#}
{#                $("#unit").html(unit);#}
{#            }#}
{#            var group = res.group;#}
{#            if (group) {#}
{#                $("#group").html(group);#}
{#            }#}
{#            // {#签到时间#}
{#            var insert_time = res.insert_time;#}
{#            if (insert_time) {#}
{#                $("#insert_time").html(insert_time);#}
{#            }#}
{#            var pic_url = res.pic_url;#}
{#            if (pic_url) {#}
{#                $("#pic_url").attr('src', pic_url);#}
{#            }#}
{#            // {#应到人数#}
{#            var should_num = res.should_num;#}
{#            if (should_num) {#}
{#                $("#should_num").html(should_num);#}
{#            }#}
{#            // {#请假人数#}
{#            var sick_num = res.sick_num;#}
{#            if (sick_num) {#}
{#                $("#sick_num").html(sick_num);#}
{#            }#}
{#            // {#未到人数#}
{#            var lose_num = res.lose_num;#}
{#            if (lose_num) {#}
{#                $("#lose_num").html(lose_num);#}
{#            }#}
{#            // {#实到人数#}
{#            var people_num = res.people_num;#}
{#            if (people_num) {#}
{#                $("#people_num").html(people_num);#}
{#            }#}
{#            // {#值班首长#}
{#            var leader_name = res.leader_name;#}
{#            if (leader_name) {#}
{#                $("#leader_name").text(leader_name);#}
{#            }#}
{#            // {#备注#}
{#            var status = res.status1;#}
{#            if (status) {#}
{#                $("#status").text(status);#}
{#            }#}
{#            var weather = res.weather;#}
{#            if (weather) {#}
{#                $("#weather").html('{{ now_time }}' + weather);#}
{#            }#}
{#            var context = res.contexts;#}
{#            if (context) {#}
{#                var str = '';#}
{#                for (var i = 0; i < context.length; i++) {#}
{#                    str += '<div class="li">';#}
{#                    str += context[i];#}
{#                    str += '</div>';#}
{#                }#}
{#                $('#content').html(str);#}
{#            }#}
{#        });#}
{#    });#}
{#</script>#}
</body>

</html>